﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Website/Views/Shared/Master.Master"
    Inherits="System.Web.Mvc.ViewPage<PagedList<ENews>>" %>

<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%if (Model.Count == 0)
      {
    %>
    <h2>
        此分类不存在或此分类没有数据！</h2>
    <%}
      else
      { 
    %>
    <dl class="news_box">
        <dt><span class="l"></span><a>
            <%=ViewData["classname"] %></a><span class="r"></span></dt>
        <%
            foreach (ENews news in Model)
            {

        %>
        <dd>
            <span class="floatRight">
                <%=news.WriteTime.ToString("d")%></span>
            <%= Html.ActionLink(news.Title, "NewsInfo", "News", new { newsId = news.NewsId }, null)%>
            <div class="ddd">
                <%= SpecialStringHelper.Ellipsis(SpecialStringHelper.HtmlToTxt(news.Contents),200,true) %>
                <a href="<%= Url.Action("NewsInfo","News",new { newsId = news.NewsId }) %>">
                    <img src="<%=Url.Content("~/Images/ljsq1.gif") %>" alt="" />
                </a>
            </div>
        </dd>
        <%
            }
        %>
    </dl>
    <div class="pager">
        <span>共<%=Model.TotalItemCount%>条记录， 页<%=Model.CurrentPageIndex%>/<%=Model.TotalPageCount%></span>
        <%=Html.Pager(Model, new PagerOptions { ContainerTagName = "span", PageIndexParameterName = "NewsId", AlwaysShowFirstLastPageNumber = true, HorizontalAlign = "right" })%>
    </div>
    <%} %>
    <div class="backHome">
        <a href="<%=Url.Action("Index","Home") %>">返回首页</a></div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <%= HtmlMetaHelper.HtmlTitle(ViewData["classname"].ToString())%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cssLink" runat="server">
    <link rel="stylesheet" type="text/css" href="<%=Url.Content("~/css/Website/StyleSheet1.css") %>" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="jsLink" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cssContent" runat="server">
    <style type="text/css">
        .ddd
        {
            line-height: 1.2;
            color: #666;
            text-indent: 2em;
            clear: both;
            padding: 5px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="jsContent" runat="server">
</asp:Content>
